---
title: "Main Analysis" 
author: "melissa_barales"  
output: pdf_document 
--- 

```{r}
setwd("~/Desktop/Senior Thesis/Data/Pooled CES") 
```

```{r}
library(haven)
library(dplyr)
library(tidyverse)
library(stargazer)
library(ggplot2)
```

```{r}
library(dotwhisker)
```

```{r}
library(sjmisc)
```

```{r}
#loading in CES data
dat <- readRDS("Pooled Data.rds")
```

```{r}
#loading in crosswalk file - to make Hispanic enclaves
crosswalk <- read.csv("geocorr2014_2202404250.csv", stringsAsFactors=FALSE)
```

```{r}
#creating a puma identifier variable in crosswalk file
crosswalk <-  crosswalk %>% unite("puma_2", state, puma12, sep= "-", 
        remove = FALSE)
```

```{r}
#loading in dataset of all Hispanic enclaves (contains PUMAs that have enclaves)
Hisp_enclaves <- read.csv("Hisp_enclaves.csv")
```

```{r}
#creating an enclave residency variable in crosswalk file 
#1 - yes lives in an enclave 
#0 - no does not live in an enclave
crosswalk_merged <- crosswalk %>% 
  mutate(enclave_res = ifelse (puma_2 %in% Hisp_enclaves$puma_2, 1, 0))
```

```{r}
table(crosswalk_merged$enclave_res)
```

```{r}
#Adding in the proportion of a puma's population that is made up of  a 
#Hispanic enclave to dataset of cross_walk merged
Hisp_enclaves <- Hisp_enclaves %>% select(puma_2, prop)

crosswalk_merged <- crosswalk_merged %>% 
  left_join(Hisp_enclaves, by="puma_2" )
```

```{r}
#Filtering out all observations that do not have pumas w/ enclaves in them 
crosswalk_merged <- crosswalk_merged %>% filter(!is.na(prop))
```

```{r}
#filerting out all repeat zipcodes
crosswalk_merged <- crosswalk_merged %>% 
  filter(zcta5!=99999) %>%
  distinct(zcta5, .keep_all = TRUE)
```

```{r}
dat <- dat %>% mutate(zcta5=zipcode)
```

```{r}
#creating enclave residency variable in CES dataset
dat <- dat %>% 
  mutate(enclave_res = ifelse (zcta5 %in% crosswalk_merged$zcta5, 1, 0))
```

```{r}
table(dat$enclave_res)
```

```{r}
#recoding control variables in CES
```

```{r}
table(dat$gender)
```

```{r}
#making dummy variables for gender - male
dat$male <- NA
dat$male[dat$gender==1] <- 1
dat$male[dat$gender==2] <- 0
```

```{r}
table(dat$male)
```

```{r}
#making dummy variable gender - female
dat$female <- NA
dat$female[dat$gender==2] <- 1
dat$female[dat$gender==1] <- 0
```

```{r}
table(dat$female)
```

```{r}
#making new education variable
dat$educ2 <- NA
dat$educ2[dat$educ==1] <- "a - No HS"
dat$educ2[dat$educ==2] <- "b - HS Grad"
dat$educ2[dat$educ==3 | dat$educ==4] <- "c - Some College"
dat$educ2[dat$educ==5] <- "d - 4 yr"
dat$educ2[dat$educ==6] <- "e - Post-grad"
```

```{r}
dat$educ2 <- as.factor(dat$educ2)
```

```{r}
#Recoding pid 
dat$pid <- NA
dat$pid[dat$pid7== 1 | dat$pid7== 2 | dat$pid7== 3] <- "b - Democrat"
dat$pid[dat$pid7== 4] <- "a - Independent"
dat$pid[dat$pid7== 5 | dat$pid7== 6 | dat$pid7== 7] <- "c - Republican"
```

```{r}
dat$pid <- as.factor(dat$pid)
```

```{r}
dat$age2 <- dat$age^2
```

```{r}
#recoding outcome variables
```

```{r}
table(dat$vv_turnout_gvm2)
```

```{r}
table(dat$vv_turnout_gvm2, dat$year)
```

```{r}
#new turnout variable
dat$turnout2 <- NA
dat$turnout2[dat$vv_turnout_gvm2==2] <- 1
dat$turnout2[dat$vv_turnout_gvm2==1] <- 2
```

```{r}
table(dat$turnout2)
```

```{r}
#new reg variable 
dat$registration <- NA
dat$registration[dat$vv_regstatus==1] <- 2
dat$registration[dat$vv_regstatus== 2 | dat$vv_regstatus== 3 |
                   dat$vv_regstatus== 4 | dat$vv_regstatus== 5 |
                   dat$vv_regstatus== 6]  <- 1
```

```{r}
table(dat$registration)
```

```{r}
#recoding other political outcomes 
```

```{r}
#recoding order of variables
#Politcal Meeting 
dat$political_meeting <- as.numeric(dat$political_meeting)
dat$political_meeting[dat$political_meeting==1] <- 1
dat$political_meeting[dat$political_meeting==2] <- 0
```

```{r}
#Politcal Sign
dat$political_sign <- as.numeric(dat$political_sign)
dat$political_sign[dat$political_sign==2] <- 0
```

```{r}
#volunteer campaign 
dat$campaign_volunteer <- as.numeric(dat$campaign_volunteer)
dat$campaign_volunteer[dat$campaign_volunteer==2] <- 0
```

```{r}
#Political Protest
dat$political_protest <- as.numeric(dat$political_protest)
dat$political_protest[dat$political_protest==2] <- 0
```

```{r}
#Political Contact
dat$political_contact <- as.numeric(dat$political_contact)
dat$political_contact[dat$political_contact==2] <- 0
```

```{r}
#Political Donation
dat$political_donation <- as.numeric(dat$political_donation)
dat$political_donation[dat$political_donation==2] <- 0
```

```{r}
#Social Media - post
dat$sm_post <- as.numeric(dat$sm_post)
dat$sm_post[dat$sm_post==2] <- 0
```

```{r}
#Social Media - story
dat$sm_story <- as.numeric(dat$sm_story)
dat$sm_story[dat$sm_story==2] <- 0
```

```{r}
#Social Media - event
dat$sm_event <- as.numeric(dat$sm_event)
dat$sm_event[dat$sm_event==2] <- 0
```

```{r}
#Social Media - comment
dat$sm_comment <- as.numeric(dat$sm_comment)
dat$sm_comment[dat$sm_comment==2] <- 0
```

```{r}
#Social Media - forward
dat$sm_forward <- as.numeric(dat$sm_forward)
dat$sm_forward[dat$sm_forward==2] <- 0
```

```{r}
#other political attitudes 
table(dat$approval_gov)
```

```{r}
dat$approval_gov_1 <- NA
dat$approval_gov_1[dat$approval_gov== 1 | 
                     dat$approval_gov== 2] <- 1
dat$approval_gov_1[dat$approval_gov== 3 | 
                     dat$approval_gov== 4] <- 0
```
=
```{r}
dat$approval_pres_1 <- NA
dat$approval_pres_1[dat$approval_pres== 1 | 
                     dat$approval_pres== 2] <- 1
dat$approval_pres_1[dat$approval_pres== 3 | 
                     dat$approval_pres== 4] <- 0
```

```{r}
dat$approval_rep_1 <- NA
dat$approval_rep_1[dat$approval_rep== 1 | 
                     dat$approval_rep== 2] <- 1
dat$approval_rep_1[dat$approval_rep== 3 | 
                     dat$approval_rep== 4] <- 0
```

```{r}
dat$approval_sen1_1 <- NA
dat$approval_sen1_1[dat$approval_sen1== 1 | 
                     dat$approval_sen1== 2] <- 1
dat$approval_sen1_1[dat$approval_sen1== 3 | 
                     dat$approval_sen1== 4] <- 0
```

```{r}
dat$approval_sen2_1 <- NA
dat$approval_sen2_1[dat$approval_sen2== 1 | 
                     dat$approval_sen2== 2] <- 1
dat$approval_sen2_1[dat$approval_sen2== 3 | 
                     dat$approval_sen2== 4] <- 0
```

```{r}
dat$att_congress_1 <- NA
dat$att_congress_1[dat$att_congress== 1 | 
                     dat$att_congress== 2] <- 1
dat$att_congress_1[dat$att_congress== 3 | 
                     dat$att_congress== 4] <- 0
```

```{r}
dat$att_supreme_1 <- NA
dat$att_supreme_1[dat$att_supreme== 1 | 
                     dat$att_supreme== 2] <- 1
dat$att_supreme_1[dat$att_supreme== 3 | 
                     dat$att_supreme== 4] <- 0
```

```{r}
table(dat$newsint)
```

```{r}
dat$newsint_1 <- NA
dat$newsint_1[dat$newsint==4] <- 1
dat$newsint_1[dat$newsint==3] <- 2
dat$newsint_1[dat$newsint==2] <- 3
dat$newsint_1[dat$newsint==1] <- 4
```

```{r}
table(dat$newsint_1)
```

```{r}
table(dat$state)
```

```{r}
dat$state <- haven::as_factor(dat$state)
```

```{r}
table(dat$state)
```

```{r}
dat$ideo5_new <- NA
dat$ideo5_new[dat$ideo5==6] <- "a - unsure"
dat$ideo5_new[dat$ideo5== 1 | dat$ideo5== 2] <- "b - liberal"
dat$ideo5_new[dat$ideo5== 4 | dat$ideo5== 5] <- "c - conservative"
dat$ideo5_new[dat$ideo5== 3] <- "d - moderate"
```

```{r}
table(dat$ideo5_new) 
```

```{r}
dat$has_child2 <- NA
dat$has_child2[dat$has_child== 2] <- "a - no children"
dat$has_child2[dat$has_child== 1] <- "b - children "
```

```{r}
table(dat$has_child2)
```

```{r}
dat$ownhome2 <- NA
dat$ownhome2[dat$ownhome==1] <- "b - own home"
dat$ownhome2[dat$ownhome==2 | dat$ownhome==3] <- "a - don't own"
```

```{r}
table(dat$ownhome2)
```

```{r}
dat$employ2 <- NA
dat$employ2[dat$employ== 1 | dat$employ==2] <- "b - employed"
dat$employ2[dat$employ== 3 | dat$employ==4] <- "a - unemployed"
```

```{r}
table(dat$employ2)
```

**subsetting to only Hispanic respondents**
```{r}
#subset to Hispanic respondents
dat <- subset(dat, dat$race_new==3)
```

```{r}
table(dat$imm_status)
```

```{r}
#creating a separate dataset to only include first and second-gen immigrants
#this is the target population
dat2 <- subset(dat, dat$imm_status==1)
```

```{r}
#of these individuals, how many live in an enclave
table(dat2$enclave_res)
```


**Immigrant populaiton**

*MULTIVARIATE REGRESSIONS*

**STANDARD**

```{r}
gen_turnout_ns_1 <- lm(data= dat2, enclave_res ~ turnout2 + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen + second_gen)
```

```{r}
summary(gen_turnout_ns_1)
```

```{r echo=FALSE, results='asis'}
stargazer(gen_turnout_ns_1, type = "text")
```


```{r}
#Voter Registration 
reg_status_ns <- lm(data= dat2, enclave_res ~ registration + pid + gender + 
                     age + age2 +
                     educ2 + 
                     faminc + citizen + second_gen)
```

```{r}
summary(reg_status_ns)
```

```{r echo=FALSE, results='asis'}
stargazer(reg_status_ns, type = "text")
```

```{r} 
#Political Meetings 
pol_meeting <- lm(data= dat2, enclave_res ~ political_meeting +
                    pid + gender + 
                     age + age2 +
                     educ2 + 
                     faminc + citizen + second_gen)
```

```{r}
#note the treatment group would be first-generation immigrants
#control group is second-gen immigrants
```


```{r}
summary(pol_meeting)
```

```{r echo=FALSE, results='asis'}
stargazer(pol_meeting, type = "text")
```


```{r}
#Political Sign
pol_sign <- lm(data= dat2, enclave_res ~ political_sign +
                 pid + gender + 
                     age + age2 +
                     educ2 + 
                     faminc + citizen + second_gen)
```

```{r}
summary(pol_sign)
```

```{r echo=FALSE, results='asis'}
stargazer(pol_sign, type = "text")
```

```{r}
#Campaign Volunteer
camp_volunteer <- lm(data= dat2, enclave_res ~ campaign_volunteer +
                       pid + gender + 
                     age + age2 +
                     educ2 + 
                     faminc + citizen + second_gen)
```

```{r}
summary(camp_volunteer)
```

```{r echo=FALSE, results='asis'}
stargazer(camp_volunteer, type = "text")
```

```{r}
#Political Protest
pol_protest <- lm(data= dat2, enclave_res ~ political_protest + pid + gender + 
                     age + age2 +
                     educ2 + 
                     faminc + citizen + second_gen)
```

```{r}
summary(pol_protest)
```

```{r echo=FALSE, results='asis'}
stargazer(pol_protest, type = "text")
```

```{r}
#Political Contact
pol_contact <- lm(data= dat2, enclave_res ~ political_contact +
                    pid + gender + 
                     age + age2 +
                     educ2 + 
                     faminc + citizen + second_gen)
```

```{r}
summary(pol_contact)
```

```{r echo=FALSE, results='asis'}
stargazer(pol_contact, type = "text")
```

```{r}
#Political Donation
pol_donation <- lm(data= dat2, enclave_res ~ political_donation +
                     pid + gender + 
                     age + age2 +
                     educ2 + 
                     faminc + citizen + second_gen)
```

```{r}
summary(pol_donation)
```

```{r echo=FALSE, results='asis'}
stargazer(pol_donation, type = "text")
```


```{r}
#Approval -- pres
approval_pres <- lm(data= dat2, enclave_res ~ approval_pres_1 + 
                      pid + gender + 
                     age + age2 +
                     educ2 + 
                     faminc + citizen + second_gen)
```

```{r}
summary(approval_pres)
```

```{r echo=FALSE, results='asis'}
stargazer(approval_pres, type = "text")
```

```{r}
#Approval -- rep 
approval_rep <- lm(data= dat2, enclave_res ~ approval_rep_1 +
                     pid + gender + 
                     age + age2 +
                     educ2 + 
                     faminc + citizen + second_gen)
```

```{r}
summary(approval_rep)
```

```{r echo=FALSE, results='asis'}
stargazer(approval_rep, type = "text")
```

```{r}
#Approval -- sen1
approval_sen1 <- lm(data= dat2, enclave_res ~ approval_sen1_1 +
                      pid + gender + 
                     age + age2 +
                     educ2 + 
                     faminc + citizen + second_gen)
```

```{r}
summary(approval_sen1)
```

```{r echo=FALSE, results='asis'}
stargazer(approval_sen1, type = "text")
```

```{r}
#Approval -- sen2 
approval_sen2 <- lm(data= dat2, enclave_res ~ approval_sen2_1 +
                      pid + gender + 
                     age + age2 +
                     educ2 + 
                     faminc + citizen + second_gen)
```

```{r}
summary(approval_sen2)
```

```{r echo=FALSE, results='asis'}
stargazer(approval_sen2, type = "text")
```

```{r}
#Approval -- governor
approval_gov <- lm(data= dat2, enclave_res ~ approval_gov_1 +
                     pid + gender + 
                     age + age2 +
                     educ2 + 
                     faminc + citizen + second_gen)
```

```{r}
summary(approval_gov)
```

```{r echo=FALSE, results='asis'}
stargazer(approval_gov, type = "text")
```

```{r}
#Approval -- Congress
approval_congress <- lm(data= dat2, enclave_res ~ att_congress_1 +
                          pid + gender + 
                     age + age2 +
                     educ2 + 
                     faminc + citizen + second_gen)
```

```{r}
summary(approval_congress)
```

```{r echo=FALSE, results='asis'}
stargazer(approval_congress, type = "text")
```

```{r}
#Approval -- Supreme Court
approval_supremec <- lm(data= dat2, enclave_res ~ att_supreme_1 +
                          pid + gender + 
                     age + age2 +
                     educ2 + 
                     faminc + citizen + second_gen)
```

```{r}
summary(approval_supremec)
```

```{r echo=FALSE, results='asis'}
stargazer(approval_supremec, type = "text")
```


```{r}
#Interest in Politics 
newsint <- lm(data= dat2, enclave_res ~ newsint_1 + pid +
                gender + 
                     age + age2 +
                     educ2 + 
                     faminc + citizen + second_gen)
```

```{r}
summary(newsint)
```

```{r echo=FALSE, results='asis'}
stargazer(newsint, type = "text")
```

```{r}
#Social Media - Comment 
sm_comment <- lm(data= dat2, enclave_res ~ sm_comment + pid + gender + 
                     age + age2 +
                     educ2 + 
                     faminc + citizen + second_gen)
```

```{r}
summary(sm_comment)
```

```{r echo=FALSE, results='asis'}
stargazer(sm_comment, type = "text")
```

```{r}
sm_story <- lm(data= dat2, enclave_res ~ sm_story + pid + gender + 
                     age + age2 +
                     educ2 + 
                     faminc + citizen + second_gen)
```

```{r}
summary(sm_story)
```

```{r echo=FALSE, results='asis'}
stargazer(sm_story, type = "text")
```

```{r}
sm_event <- lm(data= dat2, enclave_res ~ sm_event + pid + gender + 
                     age + age2 +
                     educ2 + 
                     faminc + citizen + second_gen)
```

```{r}
summary(sm_event)
```

```{r echo=FALSE, results='asis'}
stargazer(sm_event, type = "text")
```

```{r}
sm_post <- lm(data= dat2, enclave_res ~ sm_post + pid + gender + 
                     age + age2 +
                     educ2 + 
                     faminc + citizen + second_gen)
```

```{r}
summary(sm_post)
```

```{r echo=FALSE, results='asis'}
stargazer(sm_post, type = "text")
```

```{r}
sm_forward <- lm(data= dat2, enclave_res ~ sm_forward + pid + gender + 
                     age + age2 +
                     educ2 + 
                     faminc + citizen + second_gen)
```

```{r}
summary(sm_forward)
```

```{r echo=FALSE, results='asis'}
stargazer(sm_forward, type = "text")
```

```{r}
?dwplot
```


```{r}
dwplot(list(gen_turnout_ns_1, reg_status_ns, pol_meeting, pol_donation, 
            pol_contact, camp_volunteer, pol_protest, pol_sign, sm_post,
            sm_story, sm_comment, sm_forward, sm_event),
       ci = 0.95,
       vline = geom_vline(
           xintercept = 0,
           colour = "grey60",
           linetype = 2
       ),
       vars_order = c("turnout2","registration", 
                      "political_meeting", "political_donation","political_contact",
                     "campaign_volunteer", "political_protest", "political_sign", "sm_post",
                     "sm_story", "sm_comment", "sm_forward", "sm_event"
                    )
        ) %>% 
        relabel_predictors( 
                      c(turnout2 = "General Turnout",
                            registration = "Voter Registration",
                            political_meeting = "Political Meeting",
                            political_donation = "Political Donation",
                            political_contact = "Contact Public Official",
                            campaign_volunteer = "Campaign Volunteer",
                            political_protest = "Political Protest",
                            political_sign = "Political Sign",
                            sm_post = "SM: Political Post",
                            sm_story = "SM: Consume Political Content",
                            sm_comment = "SM: Political Comment" ,
                            sm_forward = "SM: Share Political Content",
                            sm_event = "SM: Follow Political Events") 
          )+  
    xlab("Coefficient Estimate") + ylab("Political Behaviors") +
      geom_vline(xintercept = 0,
               colour = "grey60",
               linetype = 2) +
    scale_colour_hue(
        name = "Model",
        labels = c("General Turnout", "Voter Registration", 
                   "Politcal Meeting", "Political Donation",
                   "Contact Public Official", "Campaign Volunteer",
                   "Political Protest", "Political Sign", 
                   "SM: Political Post", "SM: Consume Political Content",
                   "SM: Political Comment", "SM: Share Political Content","SM: Follow Political Events")
     )
```


```{r}
dwplot(list(approval_pres, approval_congress, approval_supremec, approval_sen1, 
            approval_sen2, approval_rep, approval_gov, newsint),
       ci = 0.95,
       vline = geom_vline(
           xintercept = 0,
           colour = "grey60",
           linetype = 2
       ),
       vars_order = c("approval_pres_1", "att_congress_1", 
                     "att_supreme_1", "approval_sen1_1", 
            "approval_sen2_1", "approval_rep_1", "approval_gov_1", "newsint_1")
      ) %>% 
          relabel_predictors (
            c(approval_pres_1 = "President Approval",
                             att_congress_1 = "Congress Approval",
                             att_supreme_1 = "Supreme Court Approval",
                             approval_sen1_1 = "Senator 1 Approval",
                             approval_sen2_1 = "Senator 2 Approval",
                             approval_rep_1 = "Congressmember Approval",
                             approval_gov_1 = "Governor Approval",
                             newsint_1 = "Political Interest") 
           ) + 
    xlab("Coefficient Estimate") + ylab("Political Attitudes") +
      geom_vline(xintercept = 0,
               colour = "grey60",
               linetype = 2) +
    scale_colour_hue(
        name = "Model",
        labels = c("President Approval", "Congress Approval",
                   "Supreme Court Approval", "Senator 1 Approval",
                   "Senator 2 Approvaal","Congressmember Approval",
                   "Governor Approval", "Political Interest")
    )
```

```{r}
library(sjPlot)
```

**EXTRA CONTROLS**

```{r}
gen_turnout_ns_1 <- lm(data= dat2, enclave_res ~ turnout2 + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen + second_gen + ideo5_new + ownhome2 + 
                    employ2 + has_child2)
```

```{r}
summary(gen_turnout_ns_1)
```

```{r}
stargazer(gen_turnout_ns_1, type = "text")
```


```{r}
#Voter Registration 
reg_status_ns <- lm(data= dat2, enclave_res ~ registration + pid + gender + 
                     age + age2 +
                     educ2 + 
                     faminc + citizen + second_gen + ideo5_new + ownhome2 + 
                    employ2 + has_child2)
```

```{r}
summary(reg_status_ns)
```

```{r echo=FALSE, results='asis'}
stargazer(reg_status_ns, type = "text")
```

```{r} 
#Political Meetings 
pol_meeting <- lm(data= dat2, enclave_res ~ political_meeting + pid + gender + 
                     age + age2 +
                     educ2 + 
                     faminc + citizen + second_gen + ideo5_new + ownhome2 + 
                    employ2 + has_child2)
```

```{r}
summary(pol_meeting)
```

```{r echo=FALSE, results='asis'}
stargazer(pol_meeting, type = "text")
```

```{r}
#Political Sign
pol_sign <- lm(data= dat2, enclave_res ~ political_sign + pid + gender + 
                     age + age2 +
                     educ2 + 
                     faminc + citizen + second_gen + ideo5_new + ownhome2 + 
                    employ2 + has_child2)
```

```{r}
summary(pol_sign)
```

```{r echo=FALSE, results='asis'}
stargazer(pol_sign, type = "text")
```

```{r}
#Campaign Volunteer
camp_volunteer <- lm(data= dat2, enclave_res ~ campaign_volunteer + pid + gender + 
                     age + age2 +
                     educ2 + 
                     faminc + citizen + second_gen + ideo5_new + ownhome2 + 
                    employ2 + has_child2)
```

```{r}
summary(camp_volunteer)
```

```{r echo=FALSE, results='asis'}
stargazer(camp_volunteer, type = "text")
```

```{r}
#Political Protest
pol_protest <- lm(data= dat2, enclave_res ~ political_protest + pid + gender + 
                     age + age2 +
                     educ2 + 
                     faminc + citizen + second_gen + ideo5_new + ownhome2 + 
                    employ2 + has_child2)
```

```{r}
summary(pol_protest)
```

```{r echo=FALSE, results='asis'}
stargazer(pol_protest, type = "text")
```

```{r}
#Political Contact
pol_contact <- lm(data= dat2, enclave_res ~ political_contact + pid + gender + 
                     age + age2 +
                     educ2 + 
                     faminc + citizen + second_gen + ideo5_new + ownhome2 + 
                    employ2 + has_child2)
```

```{r}
summary(pol_contact)
```

```{r echo=FALSE, results='asis'}
stargazer(pol_contact, type = "text")
```

```{r}
#Political Donation
pol_donation <- lm(data= dat2, enclave_res ~ political_donation + pid + gender + 
                     age + age2 +
                     educ2 + 
                     faminc + citizen + second_gen + ideo5_new + ownhome2 + 
                    employ2 + has_child2)
```

```{r}
summary(pol_donation)
```

```{r echo=FALSE, results='asis'}
stargazer(pol_donation, type = "text")
```

```{r}
#Approval -- pres
approval_pres <- lm(data= dat2, enclave_res ~ approval_pres_1 + pid + gender + 
                     age + age2 +
                     educ2 + 
                     faminc + citizen + second_gen + ideo5_new + ownhome2 + 
                    employ2 + has_child2)
```

```{r}
summary(approval_pres)
```

```{r echo=FALSE, results='asis'}
stargazer(approval_pres, type = "text")
```

```{r}
#Approval -- rep 
approval_rep <- lm(data= dat2, enclave_res ~ approval_rep_1 + pid + gender + 
                     age + age2 +
                     educ2 + 
                     faminc + citizen + second_gen + ideo5_new + ownhome2 + 
                    employ2 + has_child2)
```

```{r}
summary(approval_rep)
```

```{r echo=FALSE, results='asis'}
stargazer(approval_rep, type = "text")
```

```{r}
#Approval -- sen1
approval_sen1 <- lm(data= dat2, enclave_res ~ approval_sen1_1 + pid + gender + 
                     age + age2 +
                     educ2 + 
                     faminc + citizen + second_gen + ideo5_new + ownhome2 + 
                    employ2 + has_child2)
```

```{r}
summary(approval_sen1)
```

```{r echo=FALSE, results='asis'}
stargazer(approval_sen1, type = "text")
```

```{r}
#Approval -- sen2 
approval_sen2 <- lm(data= dat2, enclave_res ~ approval_sen2_1 + pid + gender + 
                     age + age2 +
                     educ2 + 
                     faminc + citizen + second_gen + ideo5_new + ownhome2 + 
                    employ2 + has_child2)
```

```{r}
summary(approval_sen2)
```

```{r echo=FALSE, results='asis'}
stargazer(approval_sen2, type = "text")
```

```{r}
#Approval -- governor
approval_gov <- lm(data= dat2, enclave_res ~ approval_gov_1 + pid + gender + 
                     age + age2 +
                     educ2 + 
                     faminc + citizen + second_gen + ideo5_new + ownhome2 + 
                    employ2 + has_child2)
```

```{r}
summary(approval_gov)
```

```{r echo=FALSE, results='asis'}
stargazer(approval_gov, type = "text")
```

```{r}
#Approval -- Congress
approval_congress <- lm(data= dat2, enclave_res ~ att_congress_1 + pid + gender + 
                     age + age2 +
                     educ2 + 
                     faminc + citizen + second_gen + ideo5_new + ownhome2 + 
                    employ2 + has_child2)
```

```{r}
summary(approval_congress)
```

```{r echo=FALSE, results='asis'}
stargazer(approval_congress, type = "text")
```

```{r}
#Approval -- Supreme Court
approval_supremec <- lm(data= dat2, enclave_res ~ att_supreme_1 + pid + gender + 
                     age + age2 +
                     educ2 + 
                     faminc + citizen + second_gen + ideo5_new + ownhome2 + 
                    employ2 + has_child2)
```

```{r}
summary(approval_supremec)
```

```{r echo=FALSE, results='asis'}
stargazer(approval_supremec, type = "text")
```

```{r}
#Interest in Politics 
newsint <- lm(data= dat2, enclave_res ~ newsint_1 + pid + gender + 
                     age + age2 +
                     educ2 + 
                     faminc + citizen + second_gen + ideo5_new + ownhome2 + 
                    employ2 + has_child2)
```

```{r}
summary(newsint)
```

```{r echo=FALSE, results='asis'}
stargazer(newsint, type = "text")
```

```{r}
#Social Media - Comment 
sm_comment <- lm(data= dat2, enclave_res ~ sm_comment + pid + gender + 
                     age + age2 +
                     educ2 + 
                     faminc + citizen + second_gen + ideo5_new + ownhome2 + 
                    employ2 + has_child2)
```

```{r}
summary(sm_comment)
```

```{r echo=FALSE, results='asis'}
stargazer(sm_comment, type = "text")
```

```{r}
sm_story <- lm(data= dat2, enclave_res ~ sm_story + pid + gender + 
                     age + age2 +
                     educ2 + 
                     faminc + citizen + second_gen + ideo5_new + ownhome2 + 
                    employ2 + has_child2)
```

```{r}
summary(sm_story)
```

```{r echo=FALSE, results='asis'}
stargazer(sm_story, type = "text")
```

```{r}
sm_event <- lm(data= dat2, enclave_res ~ sm_event + pid + gender + 
                     age + age2 +
                     educ2 + 
                     faminc + citizen + second_gen + ideo5_new + ownhome2 + 
                    employ2 + has_child2)
```

```{r}
summary(sm_event)
```

```{r echo=FALSE, results='asis'}
stargazer(sm_event, type = "text")
```

```{r}
sm_post <- lm(data= dat2, enclave_res ~ sm_post + pid + gender + 
                     age + age2 +
                     educ2 + 
                     faminc + citizen + second_gen + ideo5_new + ownhome2 + 
                    employ2 + has_child2)
```

```{r}
summary(sm_post)
```

```{r echo=FALSE, results='asis'}
stargazer(sm_post, type = "text")
```

```{r}
sm_forward <- lm(data= dat2, enclave_res ~ sm_forward + pid + gender + 
                     age + age2 +
                     educ2 + 
                     faminc + citizen + second_gen + ideo5_new + ownhome2 + 
                    employ2 + has_child2)
```

```{r}
summary(sm_forward)
```

```{r echo=FALSE, results='asis'}
stargazer(sm_forward, type = "text")
```

```{r}
stargazer(gen_turnout_ns_1, reg_status_ns, pol_meeting, pol_donation, 
          pol_contact, pol_protest, pol_sign, camp_volunteer, sm_post, sm_comment, 
          sm_story, sm_event, sm_forward, 
          dep.var.labels = c("General Turnout",
                             "Voter Registration", "Political Meeting",
                            "Political Donation", 
                            "Contact Public Official", "Political Protest",
                            "Political Sign", "Campaign Volunteer", 
                            "SM: Political Post", 
                            "SM: Political Comment", 
                            "SM: Consume Political Content", 
                            "SM: Follow Political Event", 
                            "SM: Share Political Content"),
          covariate.labels = c("Enclave Residency", "Democrat", 
                               "Republican", "Sex (Female)", 
          "Age", "Age Squared", "High School Degree", "Some College", 
          "College Degree", "Postgraduate", 
          "Family Income", "Non-citizen", "Second-Generation", "Liberal", 
          "Conservative", "Moderate", "Home Ownership", 
          "Employed", "Has Children"), align=TRUE,
          title="Effect of Enclave Residency on Political Behaviors", 
          type = "text",
          out = "CONTROLS_pol_model_imm.htm")
```

```{r}
stargazer(newsint, approval_pres, approval_congress, 
          approval_supremec, approval_sen1, approval_sen2, approval_rep, 
          approval_gov, 
          dep.var.labels = c("Interest in Politics", "President Approval", 
                             "Congress Approval", "Supreme Court Approval",
                            "Senator 1 Approval", "Senator 2 Approval",
                            "House Representative Approval", 
                            "Governor Approval"),
          covariate.labels = c("Enclave Residency", "Democrat", 
                               "Republican", "Sex (Female)", 
          "Age", "Age Squared", "High School Degree", "Some College", 
          "College Degree", "Postgraduate", 
          "Family Income", "Non-citizen", "Second-Generation", "Liberal", 
          "Conservative", "Moderate", "Home Ownership", 
          "Employed", "Has Children"), align=TRUE,
          title="Effect of Enclave Residency on Immigrants' Political Attitudes", 
          type = "text",
          out = "CONTROLS_att_model_imm.htm")
```



```{r}
dwplot(list(gen_turnout_ns_1, reg_status_ns, pol_meeting, pol_donation, 
            pol_contact, camp_volunteer, pol_protest, pol_sign, sm_post,
            sm_story, sm_comment, sm_forward, sm_event),
       ci = 0.95,
       vline = geom_vline(
           xintercept = 0,
           colour = "grey60",
           linetype = 2
       ),
       vars_order = c("turnout2","registration", 
                      "political_meeting", "political_donation","political_contact",
                     "campaign_volunteer", "political_protest", "political_sign", "sm_post",
                     "sm_story", "sm_comment", "sm_forward", "sm_event"
                    )
        ) %>% 
        relabel_predictors( 
                      c(turnout2 = "General Turnout",
                            registration = "Voter Registration",
                            political_meeting = "Political Meeting",
                            political_donation = "Political Donation",
                            political_contact = "Contact Public Official",
                            campaign_volunteer = "Campaign Volunteer",
                            political_protest = "Political Protest",
                            political_sign = "Political Sign",
                            sm_post = "SM: Political Post",
                            sm_story = "SM: Consume Political Content",
                            sm_comment = "SM: Political Comment" ,
                            sm_forward = "SM: Share Political Content",
                            sm_event = "SM: Follow Political Events") 
          )+  
    xlab("Coefficient Estimate") + ylab("Political Behaviors") +
      geom_vline(xintercept = 0,
               colour = "grey60",
               linetype = 2) +
    scale_colour_hue(
        name = "Model",
        labels = c("General Turnout", "Voter Registration", 
                   "Politcal Meeting", "Political Donation",
                   "Contact Public Official", "Campaign Volunteer",
                   "Political Protest", "Political Sign", 
                   "SM: Political Post", "SM: Consume Political Content",
                   "SM: Political Comment", "SM: Share Political Content","SM: Follow Political Events")
     )
```

```{r}
dwplot(list(approval_pres, approval_congress, approval_supremec, approval_sen1, 
            approval_sen2, approval_rep, approval_gov, newsint),
       ci = 0.95,
       vline = geom_vline(
           xintercept = 0,
           colour = "grey60",
           linetype = 2
       ),
       vars_order = c("approval_pres_1", "att_congress_1", 
                     "att_supreme_1", "approval_sen1_1", 
            "approval_sen2_1", "approval_rep_1", "approval_gov_1", "newsint_1")
      ) %>% 
          relabel_predictors (
            c(approval_pres_1 = "President Approval",
                             att_congress_1 = "Congress Approval",
                             att_supreme_1 = "Supreme Court Approval",
                             approval_sen1_1 = "Senator 1 Approval",
                             approval_sen2_1 = "Senator 2 Approval",
                             approval_rep_1 = "Congressmember Approval",
                             approval_gov_1 = "Governor Approval",
                             newsint_1 = "Political Interest") 
           ) + 
    xlab("Coefficient Estimate") + ylab("Political Attitudes") +
      geom_vline(xintercept = 0,
               colour = "grey60",
               linetype = 2) +
    scale_colour_hue(
        name = "Model",
        labels = c("President Approval", "Congress Approval",
                   "Supreme Court Approval", "Senator 1 Approval",
                   "Senator 2 Approvaal","Congressmember Approval",
                   "Governor Approval", "Political Interest")
    )
```

**FIRST-GEN IMMIGRANTS**

```{r}
#General Turnout 
gen_turnout_1 <- lm(data= first_gen, enclave_res ~ turnout2 + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(gen_turnout_1)
```

```{r echo=FALSE, results='asis'}
stargazer(gen_turnout_1, type = "text")
```


```{r}
#Voter Registration 
reg_status <- lm(data= first_gen, enclave_res ~ registration + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(reg_status)
```

```{r echo=FALSE, results='asis'}
stargazer(reg_status, type = "text")
```

```{r}
#Political Meetings 
pol_meeting <- lm(data= first_gen, enclave_res ~ political_meeting + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(pol_meeting)
```

```{r echo=FALSE, results='asis'}
stargazer(pol_meeting, type = "text")
```

```{r}
#Political Sign
pol_sign <- lm(data= first_gen, enclave_res ~ political_sign + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(pol_sign)
```

```{r echo=FALSE, results='asis'}
stargazer(pol_sign, type = "text")
```

```{r}
#Campaign Volunteer
camp_volunteer <- lm(data= first_gen, enclave_res ~ campaign_volunteer +  
                   pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(camp_volunteer)
```

```{r echo=FALSE, results='asis'}
stargazer(camp_volunteer, type = "text")
```

```{r}
#Political Protest
pol_protest <- lm(data= first_gen, enclave_res ~ political_protest + 
                   pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(pol_protest)
```

```{r echo=FALSE, results='asis'}
stargazer(pol_protest, type = "text")
```

```{r}
#Political Contact
pol_contact <- lm(data= first_gen, enclave_res ~ political_contact +
                   pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(pol_contact)
```

```{r echo=FALSE, results='asis'}
stargazer(pol_contact, type = "text")
```

```{r}
#Political Donation
pol_donation <- lm(data= first_gen, enclave_res ~ political_donation + 
                   pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(pol_donation)
```

```{r echo=FALSE, results='asis'}
stargazer(pol_donation, type = "text")
```


```{r}
#Approval -- pres
approval_pres <- lm(data= first_gen, enclave_res ~ approval_pres_1 + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(approval_pres)
```

```{r echo=FALSE, results='asis'}
stargazer(approval_pres, type = "text")
```

```{r}
#Approval -- rep 
approval_rep <- lm(data= first_gen, enclave_res ~ approval_rep_1 + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(approval_rep)
```

```{r echo=FALSE, results='asis'}
stargazer(approval_rep, type = "text")
```

```{r}
#Approval -- sen1
approval_sen1 <- lm(data= first_gen, enclave_res ~ approval_sen1_1 + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(approval_sen1)
```

```{r echo=FALSE, results='asis'}
stargazer(approval_sen1, type = "text")
```

```{r}
#Approval -- sen2 
approval_sen2 <- lm(data= first_gen, enclave_res ~ approval_sen2_1 + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen) 
```

```{r}
summary(approval_sen2)
```

```{r echo=FALSE, results='asis'}
stargazer(approval_sen2, type = "text")
```

```{r}
#Approval -- governor
approval_gov <- lm(data= first_gen,  enclave_res ~ approval_gov_1 + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(approval_gov)
```

```{r echo=FALSE, results='asis'}
stargazer(approval_gov, type = "text")
```

```{r}
#Approval -- Congress
approval_congress <- lm(data= first_gen, enclave_res ~  att_congress_1 + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(approval_congress)
```

```{r echo=FALSE, results='asis'}
stargazer(approval_congress, type = "text")
```

```{r}
#Approval -- Supreme Court
approval_supremec <- lm(data= first_gen, enclave_res ~ att_supreme_1 + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(approval_supremec)
```

```{r echo=FALSE, results='asis'}
stargazer(approval_supremec, type = "text")
```

```{r}
#Interest in Politics 
newsint <- lm(data= first_gen, enclave_res ~ newsint_1 + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(newsint)
```

```{r echo=FALSE, results='asis'}
stargazer(newsint, type = "text")
```

```{r}
#Social Media - Comment 
sm_comment <- lm(data= first_gen, enclave_res ~ sm_comment + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(sm_comment)
```

```{r echo=FALSE, results='asis'}
stargazer(sm_comment, type = "text")
```

```{r}
sm_story <- lm(data= first_gen, enclave_res ~ sm_story + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(sm_story)
```

```{r echo=FALSE, results='asis'}
stargazer(sm_story, type = "text")
```

```{r}
sm_event <- lm(data= first_gen, enclave_res ~ sm_event + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(sm_event)
```

```{r echo=FALSE, results='asis'}
stargazer(sm_event, type = "text")
```

```{r}
sm_post <- lm(data= first_gen,enclave_res ~ sm_post + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(sm_post)
```

```{r echo=FALSE, results='asis'}
stargazer(sm_post, type = "text")
```

```{r}
sm_forward <- lm(data= first_gen, enclave_res ~  sm_forward + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(sm_forward)
```

```{r echo=FALSE, results='asis'}
stargazer(sm_forward, type = "text")
```

```{r}
stargazer(gen_turnout_1, reg_status, pol_meeting, pol_donation, pol_contact, 
          pol_protest, pol_sign, camp_volunteer, sm_post, sm_comment, 
          sm_story, sm_event, sm_forward, 
          dep.var.labels = c("General Turnout", 
                             "Voter Registration", "Political Meeting",
                            "Political Donation", 
                            "Contact Public Official", "Political Protest",
                            "Political Sign", "Campaign Volunteer", "SM: Political Post", 
                            "SM: Political Comment", 
                            "SM: Consume Political Content", 
                            "SM: Follow Political Event", 
                            "SM: Share Political Content"),
          covariate.labels = c("Enclave Residency", "Democrat", 
                               "Republican", "Sex (Female)", 
          "Age", "Age Squared", "High School Degree", "Some College", 
          "College Degree", "Postgraduate", 
          "Family Income", "Non-citizen"), align=TRUE,
          title="Effect of Enclave Residency on Political Behaviors", 
          type = "text",
          out = "FIRST_combined_pol_model_imm.htm")
```

```{r}
stargazer(newsint, approval_pres, approval_congress, 
          approval_supremec, approval_sen1, approval_sen2, approval_rep, 
          approval_gov, 
          dep.var.labels = c("Interest in Politics", "President Approval", 
                             "Congress Approval", "Supreme Court Approval",
                            "Senator 1 Approval", "Senator 2 Approval",
                            "House Representative Approval", 
                            "Governor Approval"),
          covariate.labels = c("Enclave Residency", "Democrat", 
                               "Republican", "Sex (Female)", 
          "Age", "Age Squared", "High School Degree", "Some College", 
          "College Degree", "Postgraduate", 
          "Family Income", "Non-citizen"), align=TRUE,
          title="Effect of Enclave Residency on Immigrants' Political Attitudes", 
          type = "text",
          out = "FIRST_combined_att_model_imm.htm")
```

```{r}
dwplot(list(gen_turnout_ns_1, reg_status_ns, pol_meeting, pol_donation, 
            pol_contact, camp_volunteer, pol_protest, pol_sign, sm_post,
            sm_story, sm_comment, sm_forward, sm_event),
       ci = 0.95,
       vline = geom_vline(
           xintercept = 0,
           colour = "grey60",
           linetype = 2
       ),
       vars_order = c("turnout2","registration", 
                      "political_meeting", "political_donation","political_contact",
                     "campaign_volunteer", "political_protest", "political_sign", "sm_post",
                     "sm_story", "sm_comment", "sm_forward", "sm_event"
                    )
        ) %>% 
        relabel_predictors( 
                      c(turnout2 = "General Turnout",
                            registration = "Voter Registration",
                            political_meeting = "Political Meeting",
                            political_donation = "Political Donation",
                            political_contact = "Contact Public Official",
                            campaign_volunteer = "Campaign Volunteer",
                            political_protest = "Political Protest",
                            political_sign = "Political Sign",
                            sm_post = "SM: Political Post",
                            sm_story = "SM: Consume Political Content",
                            sm_comment = "SM: Political Comment" ,
                            sm_forward = "SM: Share Political Content",
                            sm_event = "SM: Follow Political Events") 
          )+  
    xlab("Coefficient Estimate") + ylab("Political Behaviors") +
      geom_vline(xintercept = 0,
               colour = "grey60",
               linetype = 2) +
    scale_colour_hue(
        name = "Model",
        labels = c("General Turnout", "Voter Registration", 
                   "Politcal Meeting", "Political Donation",
                   "Contact Public Official", "Campaign Volunteer",
                   "Political Protest", "Political Sign", 
                   "SM: Political Post", "SM: Consume Political Content",
                   "SM: Political Comment", "SM: Share Political Content","SM: Follow Political Events")
     )
```

```{r}
dwplot(list(approval_pres, approval_congress, approval_supremec, approval_sen1, 
            approval_sen2, approval_rep, approval_gov, newsint),
       ci = 0.95,
       vline = geom_vline(
           xintercept = 0,
           colour = "grey60",
           linetype = 2
       ),
       vars_order = c("approval_pres_1", "att_congress_1", 
                     "att_supreme_1", "approval_sen1_1", 
            "approval_sen2_1", "approval_rep_1", "approval_gov_1", "newsint_1")
      ) %>% 
          relabel_predictors (
            c(approval_pres_1 = "President Approval",
                             att_congress_1 = "Congress Approval",
                             att_supreme_1 = "Supreme Court Approval",
                             approval_sen1_1 = "Senator 1 Approval",
                             approval_sen2_1 = "Senator 2 Approval",
                             approval_rep_1 = "Congressmember Approval",
                             approval_gov_1 = "Governor Approval",
                             newsint_1 = "Political Interest") 
           ) + 
    xlab("Coefficient Estimate") + ylab("Political Attitudes") +
      geom_vline(xintercept = 0,
               colour = "grey60",
               linetype = 2) +
    scale_colour_hue(
        name = "Model",
        labels = c("President Approval", "Congress Approval",
                   "Supreme Court Approval", "Senator 1 Approval",
                   "Senator 2 Approvaal","Congressmember Approval",
                   "Governor Approval", "Political Interest")
    )
```

**SECOND-GEN IMMIGRANTS**

```{r}
#General Turnout 
gen_turnout_1 <- lm(data= second_gen, enclave_res ~ turnout2 + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(gen_turnout_1)
```

```{r echo=FALSE, results='asis'}
stargazer(gen_turnout_1, type = "text")
```

```{r}
#Voter Registration 
reg_status <- lm(data= second_gen, enclave_res ~ registration + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(reg_status)
```

```{r echo=FALSE, results='asis'}
stargazer(reg_status, type = "text")
```

```{r}
#Political Meetings 
pol_meeting <- lm(data= second_gen, enclave_res ~ political_meeting + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(pol_meeting)
```

```{r echo=FALSE, results='asis'}
stargazer(pol_meeting, type = "text")
```

```{r}
#Political Sign
pol_sign <- lm(data= second_gen, enclave_res ~ political_sign + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(pol_sign)
```

```{r echo=FALSE, results='asis'}
stargazer(pol_sign, type = "text")
```

```{r}
#Campaign Volunteer
camp_volunteer <- lm(data= second_gen, enclave_res ~ campaign_volunteer +  
                   pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(camp_volunteer)
```

```{r echo=FALSE, results='asis'}
stargazer(camp_volunteer, type = "text")
```

```{r}
#Political Protest
pol_protest <- lm(data= second_gen, enclave_res ~ political_protest + 
                   pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(pol_protest)
```

```{r echo=FALSE, results='asis'}
stargazer(pol_protest, type = "text")
```

```{r}
#Political Contact
pol_contact <- lm(data= second_gen, enclave_res ~ political_contact +
                   pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(pol_contact)
```

```{r echo=FALSE, results='asis'}
stargazer(pol_contact, type = "text")
```

```{r}
#Political Donation
pol_donation <- lm(data= second_gen, enclave_res ~ political_donation + 
                   pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(pol_donation)
```

```{r echo=FALSE, results='asis'}
stargazer(pol_donation, type = "text")
```


```{r}
#Approval -- pres
approval_pres <- lm(data= second_gen, enclave_res ~ approval_pres_1 + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(approval_pres)
```

```{r echo=FALSE, results='asis'}
stargazer(approval_pres, type = "text")
```

```{r}
#Approval -- rep 
approval_rep <- lm(data= second_gen, enclave_res ~ approval_rep_1 + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(approval_rep)
```

```{r echo=FALSE, results='asis'}
stargazer(approval_rep, type = "text")
```

```{r}
#Approval -- sen1
approval_sen1 <- lm(data= second_gen, enclave_res ~ approval_sen1_1 + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(approval_sen1)
```

```{r echo=FALSE, results='asis'}
stargazer(approval_sen1, type = "text")
```

```{r}
#Approval -- sen2 
approval_sen2 <- lm(data= second_gen, enclave_res ~ approval_sen2_1 + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen) 
```

```{r}
summary(approval_sen2)
```

```{r echo=FALSE, results='asis'}
stargazer(approval_sen2, type = "text")
```

```{r}
#Approval -- governor
approval_gov <- lm(data= second_gen, enclave_res ~ approval_gov_1 + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(approval_gov)
```

```{r echo=FALSE, results='asis'}
stargazer(approval_gov, type = "text")
```

```{r}
#Approval -- Congress
approval_congress <- lm(data= second_gen, enclave_res ~ att_congress_1 + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(approval_congress)
```

```{r echo=FALSE, results='asis'}
stargazer(approval_congress, type = "text")
```

```{r}
#Approval -- Supreme Court
approval_supremec <- lm(data= second_gen, enclave_res ~ att_supreme_1 + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(approval_supremec)
```

```{r echo=FALSE, results='asis'}
stargazer(approval_supremec, type = "text")
```

```{r}
#Interest in Politics 
newsint <- lm(data= second_gen, enclave_res ~ newsint_1 + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(newsint)
```

```{r echo=FALSE, results='asis'}
stargazer(newsint, type = "text")
```

```{r}
#Social Media - Comment 
sm_comment <- lm(data= second_gen, enclave_res ~ sm_comment + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(sm_comment)
```

```{r echo=FALSE, results='asis'}
stargazer(sm_comment, type = "text")
```

```{r}
sm_story <- lm(data= second_gen, enclave_res ~ sm_story + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(sm_story)
```

```{r echo=FALSE, results='asis'}
stargazer(sm_story, type = "text")
```

```{r}
sm_event <- lm(data= second_gen, enclave_res ~ sm_event + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(sm_event)
```

```{r echo=FALSE, results='asis'}
stargazer(sm_event, type = "text")
```

```{r}
sm_post <- lm(data= second_gen, enclave_res ~ sm_post + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(sm_post)
```

```{r echo=FALSE, results='asis'}
stargazer(sm_post, type = "text")
```

```{r}
sm_forward <- lm(data= second_gen, enclave_res ~ sm_forward + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(sm_forward)
```

```{r echo=FALSE, results='asis'}
stargazer(sm_forward, type = "text")
```


```{r}
stargazer(gen_turnout_1, reg_status, pol_meeting, pol_donation, 
          pol_contact, pol_protest, pol_sign, camp_volunteer, sm_post, sm_comment, 
          sm_story, sm_event, sm_forward, 
          dep.var.labels = c("General Turnout",
                             "Voter Registration", "Political Meeting",
                            "Political Donation", 
                            "Contact Public Official", "Political Protest",
                            "Political Sign", "Campaign Volunteer", "SM: Political Post", 
                            "SM: Political Comment", 
                            "SM: Consume Political Content", 
                            "SM: Follow Political Event", 
                            "SM: Share Political Content"),
          covariate.labels = c("Enclave Residency", "Democrat", 
                               "Republican", "Sex (Female)", 
          "Age", "Age Squared", "High School Degree", "Some College", 
          "College Degree", "Postgraduate", 
          "Family Income", "Non-citizen"), align=TRUE,
          title="Effect of Enclave Residency on Political Behaviors", 
          type = "text",
          out = "second_pol_model_imm.htm")
```

```{r}
stargazer(newsint, approval_pres, approval_congress, 
          approval_supremec, approval_sen1, approval_sen2, approval_rep, 
          approval_gov, 
          dep.var.labels = c("Interest in Politics", "President Approval", 
                             "Congress Approval", "Supreme Court Approval",
                            "Senator 1 Approval", "Senator 2 Approval",
                            "House Representative Approval", 
                            "Governor Approval"),
          covariate.labels = c("Enclave Residency", "Democrat", 
                               "Republican", "Sex (Female)", 
          "Age", "Age Squared", "High School Degree", "Some College", 
          "College Degree", "Postgraduate", 
          "Family Income", "Non-citizen"), align=TRUE,
          title="Effect of Enclave Residency on Immigrants' Political Attitudes", 
          type = "text",
          out = "second_att_model_imm.htm")
```


```{r}
dwplot(list(gen_turnout_ns_1, reg_status_ns, pol_meeting, pol_donation, 
            pol_contact, camp_volunteer, pol_protest, pol_sign, sm_post,
            sm_story, sm_comment, sm_forward, sm_event),
       ci = 0.95,
       vline = geom_vline(
           xintercept = 0,
           colour = "grey60",
           linetype = 2
       ),
       vars_order = c("turnout2","registration", 
                      "political_meeting", "political_donation","political_contact",
                     "campaign_volunteer", "political_protest", "political_sign", "sm_post",
                     "sm_story", "sm_comment", "sm_forward", "sm_event"
                    )
        ) %>% 
        relabel_predictors( 
                      c(turnout2 = "General Turnout",
                            registration = "Voter Registration",
                            political_meeting = "Political Meeting",
                            political_donation = "Political Donation",
                            political_contact = "Contact Public Official",
                            campaign_volunteer = "Campaign Volunteer",
                            political_protest = "Political Protest",
                            political_sign = "Political Sign",
                            sm_post = "SM: Political Post",
                            sm_story = "SM: Consume Political Content",
                            sm_comment = "SM: Political Comment" ,
                            sm_forward = "SM: Share Political Content",
                            sm_event = "SM: Follow Political Events") 
          )+  
    xlab("Coefficient Estimate") + ylab("Political Behaviors") +
      geom_vline(xintercept = 0,
               colour = "grey60",
               linetype = 2) +
    scale_colour_hue(
        name = "Model",
        labels = c("General Turnout", "Voter Registration", 
                   "Politcal Meeting", "Political Donation",
                   "Contact Public Official", "Campaign Volunteer",
                   "Political Protest", "Political Sign", 
                   "SM: Political Post", "SM: Consume Political Content",
                   "SM: Political Comment", "SM: Share Political Content","SM: Follow Political Events")
     )
```

```{r}
dwplot(list(approval_pres, approval_congress, approval_supremec, approval_sen1, 
            approval_sen2, approval_rep, approval_gov, newsint),
       ci = 0.95,
       vline = geom_vline(
           xintercept = 0,
           colour = "grey60",
           linetype = 2
       ),
       vars_order = c("approval_pres_1", "att_congress_1", 
                     "att_supreme_1", "approval_sen1_1", 
            "approval_sen2_1", "approval_rep_1", "approval_gov_1", "newsint_1")
      ) %>% 
          relabel_predictors (
            c(approval_pres_1 = "President Approval",
                             att_congress_1 = "Congress Approval",
                             att_supreme_1 = "Supreme Court Approval",
                             approval_sen1_1 = "Senator 1 Approval",
                             approval_sen2_1 = "Senator 2 Approval",
                             approval_rep_1 = "Congressmember Approval",
                             approval_gov_1 = "Governor Approval",
                             newsint_1 = "Political Interest") 
           ) + 
    xlab("Coefficient Estimate") + ylab("Political Attitudes") +
      geom_vline(xintercept = 0,
               colour = "grey60",
               linetype = 2) +
    scale_colour_hue(
        name = "Model",
        labels = c("President Approval", "Congress Approval",
                   "Supreme Court Approval", "Senator 1 Approval",
                   "Senator 2 Approvaal","Congressmember Approval",
                   "Governor Approval", "Political Interest")
    )
```


**INTERACTION EFFECTS**

```{r}
names(second_gen)
```

```{r}
table(second_gen$enclave_res)
```

```{r}
second_gen$enclave_res2 <- NA
second_gen$enclave_res2[second_gen$enclave_res==0] <- "no"
second_gen$enclave_res2[second_gen$enclave_res==1] <- "yes"
```

```{r}
table(second_gen$enclave_res2)
```

```{r}
levels(second_gen$pid) <- c("Independent", "Democrat", "Republican")
```

```{r}
table(second_gen$pid)
```

```{r}
fit <- lm(political_contact ~ enclave_res2 + pid * enclave_res2, data = second_gen)
plot_model(fit, type = "pred", terms = c("pid", "enclave_res2"),
           title = "Predicted Probability to Contact a Public Official",
           axis.title = c("Party ID", "Probability"),
           axis.labels = c("Independent", "Democrat", "Republican") ,
           legend.title = "Enclave Residency")
```

```{r}
table(second_gen$educ2)
```

```{r}
levels(second_gen$educ2) <- c("No HS", "HS Graduate", "Some College", 
                              "College Graduate", "Post Graduate")
```

```{r}
table(second_gen$educ2)
```

```{r}
fit <- lm(political_contact ~ enclave_res2 + educ2 * enclave_res2, data = second_gen)
plot_model(fit, type = "pred", terms = c("educ2", "enclave_res2"),
           title = "Predicted Probability to Contact a Public Official",
           axis.title = c("Education", "Probability"),
           legend.title = "Enclave Residency")
```

```{r}
class(second_gen$gender)
```

```{r}
table(second_gen$gender)
```

```{r}
second_gen$sex <- NA
```

```{r}
second_gen$sex <- as.factor(second_gen$gender)
```

```{r}
class(second_gen$sex)
```

```{r}
levels(second_gen$sex) <- c("Male", "Female")
```

```{r}
table(second_gen$sex)
```

```{r}
fit <- lm(political_contact ~ enclave_res2 + sex * enclave_res2, data = second_gen)
plot_model(fit, type = "pred", terms = c("sex", "enclave_res2"),
           title = "Predicted Probability to Contact a Public Official",
           axis.title = c("Sex", "Probability"),
           legend.title = "Enclave Residency")
```


**SELF-SELECTION**

```{r}
##subsetting to immigrants under 30 and who have not moved in over 5 years
second_gen_1 <- subset(second_gen, second_gen$age<=30)
```

```{r}
second_gen_fin <- subset(second_gen_1, second_gen_1$city_residence==2)
```

```{r}
#General Turnout 
gen_turnout_1 <- lm(data= second_gen_fin, enclave_res ~ turnout2 + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(gen_turnout_1)
```

```{r echo=FALSE, results='asis'}
stargazer(gen_turnout_1, type = "text")
```

```{r}
#Voter Registration 
reg_status <- lm(data= second_gen_fin, enclave_res ~ registration + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(reg_status)
```

```{r echo=FALSE, results='asis'}
stargazer(reg_status, type = "text")
```

```{r}
#Political Meetings 
pol_meeting <- lm(data= second_gen_fin, enclave_res ~ political_meeting + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(pol_meeting)
```

```{r echo=FALSE, results='asis'}
stargazer(pol_meeting, type = "text")
```

```{r}
#Political Sign
pol_sign <- lm(data= second_gen_fin, enclave_res ~ political_sign + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(pol_sign)
```

```{r echo=FALSE, results='asis'}
stargazer(pol_sign, type = "text")
```

```{r}
#Campaign Volunteer
camp_volunteer <- lm(data= second_gen_fin, enclave_res ~ campaign_volunteer +  
                   pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(camp_volunteer)
```

```{r echo=FALSE, results='asis'}
stargazer(camp_volunteer, type = "text")
```

```{r}
#Political Protest
pol_protest <- lm(data= second_gen_fin, enclave_res ~ political_protest + 
                   pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(pol_protest)
```

```{r echo=FALSE, results='asis'}
stargazer(pol_protest, type = "text")
```

```{r}
#Political Contact
pol_contact <- lm(data= second_gen_fin, enclave_res ~ political_contact +
                   pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(pol_contact)
```

```{r echo=FALSE, results='asis'}
stargazer(pol_contact, type = "text")
```

```{r}
#Political Donation
pol_donation <- lm(data= second_gen_fin, enclave_res~ political_donation + 
                   pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(pol_donation)
```

```{r echo=FALSE, results='asis'}
stargazer(pol_donation, type = "text")
```


```{r}
#Approval -- pres
approval_pres <- lm(data= second_gen_fin, enclave_res ~ approval_pres_1 + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(approval_pres)
```

```{r echo=FALSE, results='asis'}
stargazer(approval_pres, type = "text")
```

```{r}
#Approval -- rep 
approval_rep <- lm(data= second_gen_fin, enclave_res ~ approval_rep_1 + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(approval_rep)
```

```{r echo=FALSE, results='asis'}
stargazer(approval_rep, type = "text")
```

```{r}
#Approval -- sen1
approval_sen1 <- lm(data= second_gen_fin, enclave_res ~ approval_sen1_1 + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(approval_sen1)
```

```{r echo=FALSE, results='asis'}
stargazer(approval_sen1, type = "text")
```

```{r}
#Approval -- sen2 
approval_sen2 <- lm(data= second_gen_fin, enclave_res ~ approval_sen2_1 + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen) 
```

```{r}
summary(approval_sen2)
```

```{r echo=FALSE, results='asis'}
stargazer(approval_sen2, type = "text")
```

```{r}
#Approval -- governor
approval_gov <- lm(data= second_gen_fin, enclave_res ~ approval_gov_1 + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(approval_gov)
```

```{r echo=FALSE, results='asis'}
stargazer(approval_gov, type = "text")
```

```{r}
#Approval -- Congress
approval_congress <- lm(data= second_gen_fin, enclave_res ~ att_congress_1 + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(approval_congress)
```

```{r echo=FALSE, results='asis'}
stargazer(approval_congress, type = "text")
```

```{r}
#Approval -- Supreme Court
approval_supremec <- lm(data= second_gen_fin, enclave_res ~ att_supreme_1 + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(approval_supremec)
```

```{r echo=FALSE, results='asis'}
stargazer(approval_supremec, type = "text")
```

```{r}
#Interest in Politics 
newsint <- lm(data= second_gen_fin, enclave_res ~ newsint_1 + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(newsint)
```

```{r echo=FALSE, results='asis'}
stargazer(newsint, type = "text")
```

```{r}
#Social Media - Comment 
sm_comment <- lm(data= second_gen_fin, enclave_res ~ sm_comment + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(sm_comment)
```

```{r echo=FALSE, results='asis'}
stargazer(sm_comment, type = "text")
```

```{r}
sm_story <- lm(data= second_gen_fin, enclave_res ~ sm_story + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(sm_story)
```

```{r echo=FALSE, results='asis'}
stargazer(sm_story, type = "text")
```

```{r}
sm_event <- lm(data= second_gen_fin, enclave_res ~ sm_event + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(sm_event)
```

```{r echo=FALSE, results='asis'}
stargazer(sm_event, type = "text")
```

```{r}
sm_post <- lm(data= second_gen_fin, enclave_res ~ sm_post  + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(sm_post)
```

```{r echo=FALSE, results='asis'}
stargazer(sm_post, type = "text")
```

```{r}
sm_forward <- lm(data= second_gen_fin, enclave_res ~ sm_forward + pid + gender + 
                      age + age2 +
                    educ2 +  
                  + faminc + citizen)
```

```{r}
summary(sm_forward)
```

```{r echo=FALSE, results='asis'}
stargazer(sm_forward, type = "text")
```


```{r}
stargazer(gen_turnout_1, reg_status, pol_meeting, pol_donation, 
          pol_contact, pol_protest, pol_sign, camp_volunteer, sm_post, sm_comment, 
          sm_story, sm_event, sm_forward, 
          dep.var.labels = c("General Turnout", 
                             "Voter Registration", "Political Meeting",
                            "Political Donation", 
                            "Contact Public Official", "Political Protest",
                            "Political Sign", "Campaign Volunteer", "SM: Political Post", 
                            "SM: Political Comment", 
                            "SM: Consume Political Content", 
                            "SM: Follow Political Event", 
                            "SM: Share Political Content"),
          covariate.labels = c("Enclave Residency", "Democrat", 
                               "Republican", "Sex (Female)", 
          "Age", "Age Squared", "High School Degree", "Some College", 
          "College Degree", "Postgraduate", 
          "Family Income", "Non-citizen"), align=TRUE,
          title="Effect of Enclave Residency on Political Behaviors", 
          type = "text",
          out = "second_SELECT_pol_model_imm.htm")
```

```{r}
stargazer(newsint, approval_pres, approval_congress, 
          approval_supremec, approval_sen1, approval_sen2, approval_rep, 
          approval_gov, 
          dep.var.labels = c("Interest in Politics", "President Approval", 
                             "Congress Approval", "Supreme Court Approval",
                            "Senator 1 Approval", "Senator 2 Approval",
                            "House Representative Approval", 
                            "Governor Approval"),
          covariate.labels = c("Enclave Residency", "Democrat", 
                               "Republican", "Sex (Female)", 
          "Age", "Age Squared", "High School Degree", "Some College", 
          "College Degree", "Postgraduate", 
          "Family Income", "Non-citizen"), align=TRUE,
          title="Effect of Enclave Residency on Immigrants' Political Attitudes", 
          type = "text",
          out = "second_SELECT_att_model_imm.htm")
```

```{r}
dwplot(list(gen_turnout_1, reg_status, pol_meeting, pol_donation, 
            pol_contact, camp_volunteer, pol_protest, pol_sign, sm_post,
            sm_story, sm_comment, sm_forward, sm_event),
       vline = geom_vline(
           xintercept = 0,
           colour = "grey60",
           linetype = 2
       ),
       vars_order = ("enclave_res")
        ) %>% 
          relabel_predictors(enclave_res = "Enclave Residency") + font_size(labels.y = 10) + 
    xlab("Coefficient Estimate") + ylab("") +
      geom_vline(xintercept = 0,
               colour = "grey60",
               linetype = 2) +
    scale_colour_hue(
        name = "Model",
        labels = c("General Turnout", "Voter Registration", "Politcal Meeting", "Political Donation",
                   "Contact Public Official", "Campaign Volunteer",
                   "Political Protest", "Political Sign", "SM: Political Post", "SM: Consume Political Content",
                   "SM: Political Comment", "SM: Share Political Content","SM: Follow Political Events")
     )
```


```{r}
dwplot(list(gen_turnout_ns_1, reg_status_ns, pol_meeting, pol_donation, 
            pol_contact, camp_volunteer, pol_protest, pol_sign, sm_post,
            sm_story, sm_comment, sm_forward, sm_event),
       ci = 0.95,
       vline = geom_vline(
           xintercept = 0,
           colour = "grey60",
           linetype = 2
       ),
       vars_order = c("turnout2","registration", 
                      "political_meeting", "political_donation","political_contact",
                     "campaign_volunteer", "political_protest", "political_sign", "sm_post",
                     "sm_story", "sm_comment", "sm_forward", "sm_event"
                    )
        ) %>% 
        relabel_predictors( 
                      c(turnout2 = "General Turnout",
                            registration = "Voter Registration",
                            political_meeting = "Political Meeting",
                            political_donation = "Political Donation",
                            political_contact = "Contact Public Official",
                            campaign_volunteer = "Campaign Volunteer",
                            political_protest = "Political Protest",
                            political_sign = "Political Sign",
                            sm_post = "SM: Political Post",
                            sm_story = "SM: Consume Political Content",
                            sm_comment = "SM: Political Comment" ,
                            sm_forward = "SM: Share Political Content",
                            sm_event = "SM: Follow Political Events") 
          )+  
    xlab("Coefficient Estimate") + ylab("Political Behaviors") +
      geom_vline(xintercept = 0,
               colour = "grey60",
               linetype = 2) +
    scale_colour_hue(
        name = "Model",
        labels = c("General Turnout", "Voter Registration", 
                   "Politcal Meeting", "Political Donation",
                   "Contact Public Official", "Campaign Volunteer",
                   "Political Protest", "Political Sign", 
                   "SM: Political Post", "SM: Consume Political Content",
                   "SM: Political Comment", "SM: Share Political Content","SM: Follow Political Events")
     )
```

```{r}
dwplot(list(approval_pres, approval_congress, approval_supremec, approval_sen1, 
            approval_sen2, approval_rep, approval_gov, newsint),
       ci = 0.95,
       vline = geom_vline(
           xintercept = 0,
           colour = "grey60",
           linetype = 2
       ),
       vars_order = c("approval_pres_1", "att_congress_1", 
                     "att_supreme_1", "approval_sen1_1", 
            "approval_sen2_1", "approval_rep_1", "approval_gov_1", "newsint_1")
      ) %>% 
          relabel_predictors (
            c(approval_pres_1 = "President Approval",
                             att_congress_1 = "Congress Approval",
                             att_supreme_1 = "Supreme Court Approval",
                             approval_sen1_1 = "Senator 1 Approval",
                             approval_sen2_1 = "Senator 2 Approval",
                             approval_rep_1 = "Congressmember Approval",
                             approval_gov_1 = "Governor Approval",
                             newsint_1 = "Political Interest") 
           ) + 
    xlab("Coefficient Estimate") + ylab("Political Attitudes") +
      geom_vline(xintercept = 0,
               colour = "grey60",
               linetype = 2) +
    scale_colour_hue(
        name = "Model",
        labels = c("President Approval", "Congress Approval",
                   "Supreme Court Approval", "Senator 1 Approval",
                   "Senator 2 Approvaal","Congressmember Approval",
                   "Governor Approval", "Political Interest")
    )
```



